package com.liu.sx.dao;

import com.liu.sx.entity.Task;

import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface TaskDao extends JpaRepository<Task,String> , JpaSpecificationExecutor<Task> {


    @Query(value = "select t from Task  t where t.address like concat('%',:query,'%') ")
    Page<Task> findAll(@Param("query") String query , Pageable pageable);

}
